<?php

namespace Modules\Api\Http\Controllers;

use HiCommon\Service\InsuranceService;
use Illuminate\Support\Facades\Request;

class InsuranceController extends BaseController
{

    /*保险公司列表*/
    public function insurance_company_list(){
        try {
            $res = InsuranceService::api_all_company();
            return $res;
        }
        catch (\Exception $exception) {
            return hello_error('fail-'.$exception->getMessage(),[],$exception->getMessage());
        }
    }

    /*保险公司险种列表*/
    public function insurance_seed_list(){
        try {
            $n_id = intval(Request::input('id'));
            $res = InsuranceService::api_all_seed($n_id);
            return $res;
        }
        catch (\Exception $exception) {
            return hello_error('fail-'.$exception->getMessage(),[],$exception->getMessage());
        }
    }
}